<head>
<script type="text/javascript" src="@{'/public/javascripts/membersPopup.js'}"></script>
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/viewMembers.css'}" />
<link rel="stylesheet" type="text/css" href="@{'/public/stylesheets/layout.css'}" />
</head>

<script type="text/javascript">
  $('#members').toggle();
</script>

<div id = "viewMembers">

<h2 id="entityName"> ${entity.name} Members </h2>
<br></br>

<input type="text" value="search" id="searchQuery" onclick="javascript: clearSearch()">
<button type="button" onClick="javascript: search(${entity.id},${isAllowedToPost},${isSystemAdmin},${isOrganizationLead})" >Search</button> 
<br/>

#{list items:members, as:'product'}
<a>${product.name} </a>
#{if isAllowedToPost || isSystemAdmin}
#{if (!product.isOrganizer(entity.id) || isOrganizationLead || isSystemAdmin) }
<a id="removeMember" href = "javascript:loadXMLDoc(${product.id},${entity.id},${isAllowedToPost},${isSystemAdmin},${isOrganizationLead})">x</a><br>
#{/if}
#{else}<br>#{/else}
#{if !entity.blockedFromEntity.contains(product)}
<a href="@{EEntities.blockUser(product.id, entity.id, isAllowedToPost)}" class=standardLink> Block ${product.name} </a>
#{/if}
#{else}
<a href="@{EEntities.unblockUser(product.id, entity.id, isAllowedToPost)}" class=standardLink> Unblock ${product.name} </a>
#{/else}
#{/if}
<br></br><br></br>
#{/list}
<input type="button" id="closeMembers" name="close" value="Close" />
</div>
